﻿using System.Collections.Generic;

namespace ManyinEngine
{
    public static class GraphFactory
    {
        public static List<Node> NewGraph1()
        {
            List<Node> ret = new List<Node>();
            // profundidad 1
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>() });

            return ret;
        }

        public static List<Node> NewGraph2()
        {
            List<Node> ret = new List<Node>();
            //// profundidad 1
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>() });

            //// profundiada 2
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>()});
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>()});
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>() });
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>() });
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>() });
            //ret.Add(new Node { Name = "node " + ret.Count, Edges = new List<Edge>() });
            //// nodo 0
            //ret[0].Edges.Add(new Edge { Cost = 1, Node = ret[1] });
            //ret[0].Edges.Add(new Edge { Cost = 1, Node = ret[2] });
            //ret[0].Edges.Add(new Edge { Cost = 1, Node = ret[3] });
            //ret[0].Edges.Add(new Edge { Cost = 1, Node = ret[4] });
            //ret[0].Edges.Add(new Edge { Cost = 1, Node = ret[5] });
            //ret[0].Edges.Add(new Edge { Cost = 1, Node = ret[6] });

            //// nodos 1 a 6
            //for (int i = 0; i < 6; i++)
            //{
            //    // con el nodo del centro
            //    ret[i + 1].Edges.Add(new Edge { Cost = 1, Node = ret[0] });
            //    // con el nodo anterio en sentido horario
            //    ret[i + 1].Edges.Add(new Edge { Cost = 1, Node = i == 0 ? ret[6] : ret[i] });
            //    // con el nodo siguiente en sentido horario
            //    ret[i + 1].Edges.Add(new Edge { Cost = 1, Node = i == 5 ? ret[2] : ret[i + 2] });
            //}

            return ret;
        }
    }
}
